<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib uri="/WEB-INF/tld/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/tld/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c"%>


<div id="content">
<div id="main-wrapper">


<div>

<h2 id="first"><bean:message key="viewprofile.label.about" /> <span
	class="nickname fn" id="nickname">${requestScope.user.username}</span></h2>

<img src="<c:url value="/img/defavatar.jpg"/>" class="userprofile photo"
	alt="${requestScope.user.username}'s avatar" width="38" height="38" />

<ul id="profile-options">
	<li class="vw"><a href="<c:url value="/gift/wish_list.do?id=${requestScope.user.idUser}"/>" rel="me">${requestScope.user.username}<bean:message
		key="viewprofile.label.about" /></a></li>

	<c:if test="${not empty sessionScope.id_user }">
		<c:choose>
			<c:when test="${sessionScope.id_user == requestScope.user.idUser}">
				<li class="mod"><a
					href="<%=request.getContextPath()%>/user/show_edit_profile.do"
					id="${requestScope.user.idUser}" class="frienddeletebtn"><bean:message
					key="viewprofile.label.modify" /></a></li>
			</c:when>
			<c:otherwise>
				<c:choose>
					<c:when test="${requestScope.friend==true}">
						<li class="dl"><a href="#" id="${requestScope.user.idUser}"
							class="frienddeletebtn"><bean:message
							key="viewprofile.label.delete" /></a></li>
					</c:when>
					<c:otherwise>
						<li class="ad"><a href="#" id="${requestScope.user.idUser}"
							class="friendaddbtn"><bean:message
							key="viewprofile.label.add" /></a></li>
					</c:otherwise>
				</c:choose>
			</c:otherwise>
		</c:choose>
	</c:if>
</ul>

<div class="clearall"></div>

<div id="description"></div>

<table id="profile-details">
	<tbody>
		<tr>

			<td><bean:message key="viewprofile.label.name" /></td>
			<td>${requestScope.user.name}</td>
		</tr>
		<tr>
			<td>Email:</td>
			<td>${requestScope.user.email}</td>
		</tr>
		<tr>
			<td><bean:message key="viewprofile.label.birth" /></td>
			<td>${requestScope.user.birthdate}</td>
		</tr>
		<tr>
			<td><bean:message key="viewprofile.label.aboutyou" /></td>
			<td>${requestScope.user.description}</td>
		</tr>
		</tr>

	</tbody>
</table>

</div>


<div class="hr">
<hr />
</div>

<c:forEach var="listElement" items="${requestScope.listUser}">
	<div class="user"><img src="<c:url value="/img/defavatar.jpg"/>"
		alt="${listElement.username} (avatar)" width="38" height="38" />
	<h4>${listElement.username}</h4>
	<p>${listElement.name}</p>
	<p><a
		href="<c:url value="/gift/wish_list.do?id=${listElement.idUser}"/>">View
	wishlist</a> | <a
		href="<c:url value="/frontoffice/view_profile.do?id=${listElement.idUser}"/>">View
	profile</a></p>

	</div>
</c:forEach>
<div class="clearall"></div>

</div>
</div>
<!-- Closes #content -->
